﻿using Prism.Commands;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Controls;

namespace PlaceOrder_Client.Commands
{
    public static class Commands
    {
        public static DelegateCommand<object> CopyCommand { get; } = new DelegateCommand<object>(CopyExecute);
        public static DelegateCommand<object> ReviewCommand { get; } = new DelegateCommand<object>(ReviewExecute);

        private static void ReviewExecute(object reviewText)
        {
           
        }

        private static void CopyExecute(object parameter)
        {
            if (parameter is not null)
            {
                Clipboard.SetText(parameter.ToString());
            }
        }

        private static bool CanCopyExecute(object parameter)
        {
            // 检查是否可以执行复制操作的逻辑，例如检查是否有文本可复制等
            return true; // 简单示例，始终返回 true
        }

    }
}
